package org.meteorshower.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.meteorshower.dao.IAdminDao;
import org.meteorshower.domain.Admin;
import org.meteorshower.service.IAdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;

@Service
public class AdminServiceImpl extends ServiceImpl<IAdminDao, Admin> implements IAdminService{

    @Autowired
    private IAdminDao adminDao;

    @Override
    public UserDetails loadUserByUsername(String s) throws UsernameNotFoundException {
        return adminDao.login(s);
    }
}
